-- GENERATED SPELL FOR [Razorfen Quilguard] --


function spell0_4436(pUnit, Event) --@Battle Stance,Self--
pUnit:FullCastSpellOnTarget(7165,pUnit)
pUnit:RegisterEvent('Sorts_4436', 579, 1)
end

function spell1_4436(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(8258,pUnit)
pUnit:RegisterEvent('Sorts_4436', 579, 1)
end

function spell2_4436(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15548,pUnit)
pUnit:RegisterEvent('Sorts_4436', 10296, 1)
end

function Sorts_4436(pUnit, Event)
local choix_sorts_4436 = math.random(0, 2)
if choix_sorts_4436 == 0 then
pUnit:RegisterEvent('spell0_4436', 1, 1)
end
if choix_sorts_4436 == 1 then
pUnit:RegisterEvent('spell1_4436', 1, 1)
end
if choix_sorts_4436 == 2 then
pUnit:RegisterEvent('spell2_4436', 1, 1)
end
end

function mob4436_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4436', math.random(1500, 3000), 1)
end

function mob4436_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4436_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4436_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4436, 1, 'mob4436_Action')
RegisterUnitEvent(4436, 2, 'mob4436_Leave')
RegisterUnitEvent(4436, 3, 'mob4436_Kill')
RegisterUnitEvent(4436, 4, 'mob4436_Die')
